--重装小兔衍生物
local s,id=GetID()
function s.initial_effect(c)
	local e2=Effect.CreateEffect(c)
	e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
	e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
	e2:SetRange(LOCATION_MZONE)
	e2:SetCode(PHASE_END+EVENT_PHASE)
	e2:SetCountLimit(1)
	e2:SetOperation(s.addc)
	c:RegisterEffect(e2)				
end
function s.addc(e,tp,eg,ep,ev,re,r,rp)
	local tc=e:GetHandler() 
	Duel.Destroy(tc,REASON_EFFECT)
	Duel.SetTargetPlayer(1-tp)
	local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
	local d=tc:GetAttack()
	if d<0 then d=0 end
	Duel.Damage(p,d,REASON_EFFECT)
end